<template>
  <!--申报流程组件-->
  <div class="declare_process_container">
      <!--申报标题-->
      <div class="declare_process_title">{{declareTitle}}</div>
      <!--申报流程列表-->
      <div class="declare_process_list">
        <!--每一条的流程-->
        <div class="declare_process_item" v-for="(item,index) in processList" >
          <!--流程图标-->
          <div class="declare_process_icon">
            {{index+1}}
          </div>
          <!--流程描述-->
          <div class="declare_process_desc">
            {{item}}
          </div>
        </div>
        <!--下载模板按钮-->
        <a :href="downloadUrl" download class="declare_process_download">下载模板</a>
      </div>
  </div>
</template>
<script lang="ts" setup>
import {PropType} from "vue";
import {IDeclarationProcessType} from "../../type";
defineProps({
  //申报标题
  declareTitle: {
    type: String,
    default: "",
    required: true
  },
  //申报流程列表
  processList: {
    type: Array as PropType<Array<IDeclarationProcessType>>,
    default: () => [],
    required: true
  },
  //下载模板链接
  downloadUrl: {
    type: String,
    default: "",
    required: true
  }
})
</script>
<style lang="scss" scoped>
.declare_process_container {
  display: flex;
  min-height: 300px;
  border: 1px solid #e5e5e5;
}
.declare_process_title {
  display: flex;
  align-items: center;
  width: 5%;
  min-width: 70px;
  background-color: #b32d2e;
  font-size: 36px;
  text-align: center;
  color: $theme-color-white;
}
.declare_process_list {
  position: relative;
  top: 0;
  left: 0;
  padding: 10px;
  line-height: 1.5;
  width: calc(100% - 20%);
}
.declare_process_item {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}
.declare_process_icon {
  text-align: center;
  flex-shrink: 0;
  width: 30px;
  height: 35px;
  margin-right: 10px;
  background-repeat: no-repeat;
  background-image:  url("../../images/index.png");
  background-size: cover;
  background-position: 100% 100%;
  color: $theme-color-white;
}
.declare_process_download {
  position: absolute;
  right: 0;
  top: 0;
  transform: translate(150px,10px);
  width: 100px;
  display: block;
  text-decoration: none;
  color: $theme-color-white;
  border: 1px solid $theme-color-gray;
  border-radius: 4px;
  text-align: center;
  background-color: $theme-color-blue;
}
</style>
